﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTOSingTowerMall;

namespace BLSingTowerMall
{
    public class FeedbackProcess
    {
        private DBSingTowerMallEntities db = new DBSingTowerMallEntities();

        public UserDetail retriveUserDetails()
        {
            UserDetail user = new UserDetail();
            return user;
        }

        public bool insertFeedback(Feedback newFeedback)
        {
            return true;
        }

        public IEnumerable<IFeedback> GetFeedbacks()
        {
            IEnumerable<IFeedback> allFeedbacks = from f in db.Feedbacks select f;
            return allFeedbacks;
        }

        public int countFeedbacks()
        {
            var allFeedbacks = from f in db.Feedbacks select f;
            return allFeedbacks.Count();
        }

        /*
        public List<Feedback> GetFeedbacks(int iBeginRowIndex, int iMaximumRows)
        {
            var allFeedbacks = from f in db.Feedbacks select f;
            allFeedbacks = allFeedbacks.Skip(iBeginRowIndex).Take(iMaximumRows);
            return allFeedbacks.ToList();
        }
         * */
    }
}
